package com.pg.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Service;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pg.entity.cj.Wd;
import com.pg.mapper.WdMapper;
import com.pg.service.WdService;

/**
 * <p>
 * 温度 服务实现类
 * </p>
 *
 * @author likl
 * @since 2020-07-06
 */
@Service
@DS("proxyDs")
@Primary
public class WdServiceImpl extends ServiceImpl<WdMapper, Wd> implements WdService {

    @Autowired
    private WdMapper wdMapper;

    @Override
    public List<Wd> selectForList(Page<?> page, Wd wd, Date startCheckTime, Date endCheckTime) {
        if (null == wd) {
            return wdMapper.selectForList(page, null, null, null, null, null, null, null, null);
        }
        return wdMapper.selectForList(page, wd.getSupplierWorkNo(), wd.getSupplierCode(), wd.getCategoryType(), wd.getEquipmentName(), startCheckTime, endCheckTime, wd.getPdCode(), wd.getProductModel());
    }
}
